package Q2.service;

import Q2.pojo.Student;
import lombok.NonNull;

/**
 * Student service, provide student operation method
 *
 * @author chisheng
 */
public interface StudentService {

    /**
     * Add a student
     *
     * @param student Student instance
     * @return true if add successfully, false otherwise.
     */
    boolean addStudent(@NonNull Student student);

    /**
     * Remove a student
     *
     * @param id student id
     * @return true if remove successfully, false otherwise
     */
    boolean removeStudent(int id);

    /**
     * Update a student
     *
     * @param student Student instance
     * @return true if update successfully, false otherwise
     */
    boolean updateStudent(@NonNull Student student);

    /**
     * Query a specific student
     *
     * @param id student number
     * @return a Student instance
     */
    Student query(@NonNull String id);

}
